<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>

<body>
<div id="root">
    <h2 v-text="n"></h2>
    <!-- 自定义指令 -->
    <h2 v-big="n"></h2>
</div>


<script>
    Vue.config.productionTip = false;
    const Vm = new Vue({
        el: "#root",
        data: {
            n: 1
        },
        directives: {
            // 定义big指令
            big(ele,binging){
                console.log('ele,binging',ele,binging);
                ele.innerText = binging.value * 10;
            }
        }
    })

</script>
</body>
</html>
